package textviewer.main;

import android.content.Intent;
import android.view.View;
import android.view.View.OnClickListener;

public class BookShelfBkClickListener implements OnClickListener{
	private GUIBookShelfBkSelect parent;
	private String Book_name;
	private String Book_url;
	private String curr_charset;
	
	public BookShelfBkClickListener(GUIBookShelfBkSelect parent,String Book_name,String Book_url,String curr_charset)
	{
		this.parent=parent;
		this.Book_name=Book_name;
		this.Book_url=Book_url;
		this.curr_charset=curr_charset;
	}
	public void onClick(View v) {
		//Utility.quick_dialog(Book_name +" selected."+Book_url, parent);
		//Utility.quick_dialog(curr_charset, parent);
		goToChaperPage();
	}
	public void goToChaperPage()
	{
		Intent int_ent = new Intent(parent, GUIBookShelfChSelect.class);
		int_ent.putExtra("Book_name", Book_name);
		int_ent.putExtra("Book_url", Book_url);
		int_ent.putExtra("Current_Charset", curr_charset);
		//parent.startActivity(int_ent);
		parent.startActivityForResult(int_ent, 0);
	}
	public void set_charset(String curr_charset)
	{
		this.curr_charset=curr_charset;
	}

}
